// @charset "utf-8";

define(function(require, exports, module) {
	var clientStorage = require('../public/storage');
	var voteLog = {
		file: 'votedata.log',
		voteData: 0,
		getVoteData: function() {
			var self = this;
			var result = clientStorage.getFileContent(self.file);
			if (result === false) {
				self.voteData = 0;
			} else {
				self.voteData = result;
			}
			return self.voteData;
		},
		saveVoteData: function(str) {
			clientStorage.writeFileContent(this.file, str);
		}
	};

	module.exports = voteLog;
});